import React from 'react';
import { connect } from 'dva';
import MessageList from '../../components/MessageList';
import SendMessage from '../../components/SendMessage';

const HistoryMessagePage = ({ dispatch, products }) => {
  function handleDelete(id) {
    dispatch({
      type: 'products/delete',
      payload: id,
    });
  }
  return (
    <div>
      {
          <MessageList onDelete={handleDelete} />
      }
    </div>
  );
};

// export default Products;
export default connect(({ products }) => ({
  products,
}))(HistoryMessagePage);
